#! /bin/sh
app=ecg-gateway
service=`ls -t ${app}*.jar|head -1`
    pid=`ps -ef |grep 'java -jar'|grep $app|awk '{print $2}'`
    if [ -n "$pid" ];then
        echo "----kill java process: "$pid
        kill -9 $pid
    fi
    echo "++++start java process: "$service

nohup java -jar ecg-gateway.jar --mongo.url=mongodb://10.9.30.35:27017 --service.ecgai.url=http://10.9.30.35:8090,http://10.9.30.35:8091  --mongo.logdb=log --mongo.bizdb=ecg > startup.log& 
tail -f startup.log
